<?php 
class SettingsController extends AppController {
	
	var $name = "Settings";
	var $uses = array('Setting');
	var $helpers = array('Html', 'Form');
	
	function beforeFilter() {
		parent::beforeFilter();

		$this->Auth->authorize = 'controller';
	}

	function isAuthorized() {
		if( $this->action == 'admin_index' ) {
			if($this->Auth->user('role') != 'a') {
				return false;
			}
			else {
				return true;
			}
		}
	}
	
	function admin_index() {
		if(!empty($this->data)) {
			
		}
		else {
			$this->data = $this->Setting->find('all');
		}
	}
}
?>